﻿Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.ComponentModel
Imports Mysoft.Map.Service

' 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务，请取消对下行的注释。
' <System.Web.Script.Services.ScriptService()> _
<System.Web.Services.WebService(Namespace:="http://tempuri.org/")> _
<System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<ToolboxItem(False)> _
Public Class EventServiceProxy
    Inherits System.Web.Services.WebService

    Public AuthenticationHeader As AuthHeader

    <WebMethod(EnableSession:=True, Description:="激发事件"), SoapHeader("AuthenticationHeader")> _
    <System.Xml.Serialization.XmlInclude(GetType(MySoft.Map.Service.EventHandleState))> _
    Public Function SyncRaiseEvent(ByVal eventName As String, ByVal eventArg As String()) As ArrayList
        If AuthenticationHeader.Authenticate() Then
            Return EventService.SyncRaiseEventLocal(eventName, eventArg)
        Else
            Return Nothing
        End If

    End Function

End Class